﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using Domain.审计字段;

namespace Domain_nwj.ContractManagement
{
    /// <summary>
    /// 货主合同管理表
    /// </summary>
    public class CargoOwnerContracts : ApprovalAuditableEntityBase
    {
        [Key]
        /// <summary>
        /// 自增主键
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 合同编号（非空）
        /// </summary>
        public string ContractNumber { get; set; }

        /// <summary>
        /// 合同标题（非空）
        /// </summary>
        public string ContractTitle { get; set; }

        /// <summary>
        /// 关联单位ID（外键）
        /// </summary>
        public int? UnitId { get; set; }

        /// <summary>
        /// 货主名称（按提供的表为整型外键）
        /// </summary>
        public int? OwnerName { get; set; }

        /// <summary>
        /// 线路信息ID（外键）
        /// </summary>
        public int? Route_infoId { get; set; }

        /// <summary>
        /// 每吨运费（单位：元/吨）
        /// </summary>
        public double? TonFreightRate { get; set; }

        /// <summary>
        /// 包租条件吨位（单位：吨）
        /// </summary>
        public double? CharterConditionTonnage { get; set; }

        /// <summary>
        /// 包租金额（单位：元）
        /// </summary>
        public double? CharterAmount { get; set; }

        /// <summary>
        /// 签订日期
        /// </summary>
        public DateTime? SigningDate { get; set; }

        /// <summary>
        /// 经办人
        /// </summary>
        public string? Handler { get; set; }

        /// <summary>
        /// 合同总金额（单位：元）
        /// </summary>
        public double? ContractAmount { get; set; }

        /// <summary>
        /// 合同主体描述
        /// </summary>
        public string? ContractSubjectDescription { get; set; }

        /// <summary>
        /// 合同条款
        /// </summary>
        public string? ContractTerms { get; set; }

        /// <summary>
        /// 合同附件（存储路径或Base64）
        /// </summary>
        public string? ContractAttachment { get; set; }

        /// <summary>
        /// 订单信息ID（外键）
        /// </summary>
        public int? Order_infoId { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 流程详情（备用字段）
        /// </summary>
        public int? ProcessDetail { get; set; }
    }
}
